﻿using System.Collections.Generic;

namespace Reckoning
{
    /// <summary>
    /// Interface for reference data file
    /// </summary>
    public interface IReferenceDataFile
    {
        /// <summary>
        /// Read reference data from file
        /// </summary>
        /// <param name="path">path to file</param>
        /// <param name="referenceData">data read</param>
        /// <param name="totalCount">total word count in data</param>
        /// <param name="softwareVersion">version used to create file</param>
        /// <returns>true if successfully read</returns>
        bool Read(string path, 
                  out Dictionary<string, uint> referenceData, 
                  out uint totalCount,
                  out string softwareVersion);

        /// <summary>
        /// Write reference data to file
        /// </summary>
        /// <param name="path">path to file</param>
        /// <param name="referenceData">data to write</param>
        /// <returns>true if successfully written</returns>
        bool Write(string path, 
                   Dictionary<string, uint> referenceData);
    }
}
